cmake_minimum_required(VERSION 3.22)   
project(ftpgetfiles)  
#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_LISTS) 
set(SRC_LISTS ${SRC_LISTS} ${CMAKE_CURRENT_SOURCE_DIR}/ftpgetfiles.cpp) 
set(SRC_LISTS ${SRC_LISTS} ${CMAKE_CURRENT_SOURCE_DIR}/../../public/_ftp.cpp)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/output) 
add_executable(ftpgetfiles ${SRC_LISTS})    

#增加头文件，库文件
target_include_directories(ftpgetfiles PUBLIC  ${CMAKE_CURRENT_SOURCE_DIR}/../../public)
target_link_directories(ftpgetfiles PUBLIC  ${CMAKE_CURRENT_SOURCE_DIR}/../../public)
target_link_libraries(ftpgetfiles PUBLIC _public ftp)


# 显式指定编译器
set(CMAKE_CXX_COMPILER "g++")                                                                   #设置编译器


# 开启调试信息
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

# 开启所有警告
set(CMAKE_CXX_FLAGS "-Wall")